package com.syh.jn.scm.infrastructure.repository.model.sale;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * Date:2018/6/27
 * Author:Clown
 * 销售订单退货项;
 */
@Data
@Builder
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "T_SALE_RETURN_ORDER_ITEM")
@EqualsAndHashCode(callSuper = true)
public class SaleReturnOrderItemModel extends SuperBusinessModel {
  /**
   * 销售退货单id
   */
  @Column(name = "SALE_RETURN_ORDER_ID", columnDefinition = "bigint COMMENT '销售退货单id'")
  private Long saleReturnOrderId;
  /**
   * orderItemId关键
   */
  @Column(name = "ORDER_ITEM_ID", columnDefinition = "bigint COMMENT '订单ItemID'")
  private Long orderItemId;
  /**
   * 商品ID
   */
  @Column(name = "GOODS_ID", columnDefinition = "bigint COMMENT '商品ID'")
  private Long goodsId;
  /**
   * 商品名称
   */
  @Column(name = "GOODS_NAME", columnDefinition = "varchar(50) COMMENT '商品名称'")
  private String goodsName;
  /**
   * 商品编码
   */
  @Column(name = "GOODS_CODE", columnDefinition = "varchar(50) COMMENT '商品编码'")
  private String goodsCode;
  /**
   * 商品分类ID
   */
  @Column(name = "CATEGORY_ID", columnDefinition = "bigint COMMENT '商品分类ID'")
  private Long categoryId;
  /**
   * 品牌ID
   */
  @Column(name = "BRAND_ID", columnDefinition = "bigint COMMENT '品牌ID'")
  private Long brandId;
  /**
   * 品牌名称
   */
  @Column(name = "BRAND_NAME", columnDefinition = "varchar(50) COMMENT '品牌名称'")
  private String brandName;
  /**
   * 所属种类,应用分类编码
   */
  @Column(name = "CATEGORY_CODE", columnDefinition = "varchar(50) COMMENT '所属种类,应用分类编码'")
  private String categoryCode;
  /**
   * 所属种类名称
   */
  @Column(name = "CATEGORY_NAME", columnDefinition = "varchar(50) COMMENT '商品分类名称'")
  private String categoryName;
  /**
   * 计量单位
   */
  @Column(name = "UNITS", columnDefinition = "varchar(50) COMMENT '计量单位'")
  private String units;
  /**
   * 条码
   */
  @Column(name = "CODE_BAR", columnDefinition = "varchar(50) COMMENT '条码'")
  private String codeBar;
  /**
   * 单价
   */
  @Column(name = "PRICE", columnDefinition = "decimal(19,6) COMMENT '单价'")
  private BigDecimal price;
  /**
   * 采购数量
   */
  @Column(name = "QUANTITY", columnDefinition = "decimal(19,2) COMMENT '采购数量'")
  private BigDecimal quantity;
  /**
   * 下游客户收货数量
   */
  @Column(name = "IN_QUANTITY", columnDefinition = "decimal(19,2) COMMENT '下游客户收货数量'")
  private BigDecimal inQuantity;
  /**
   * 发货数量
   */
  @Column(name = "OUT_QUANTITY", columnDefinition = "decimal(19,2) COMMENT '发货数量'")
  private BigDecimal outQuantity;
  /**
   * 商品总额
   */
  @Column(name = "TOTAL_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '商品总额'")
  private BigDecimal totalAmount;/**
   * 所属种类,应用分类的父类目录
   */
  @Column(name = "CATEGORY_CATALOG_CODE", columnDefinition = "varchar(50) COMMENT '所属种类,应用分类的父类目录'", length = 50)
  private String categoryCatalogCode;
  /**
   * -1 辅助商品  1  基础商品
   */
  @Column(name = "IS_DEFAULT_GOODS", columnDefinition = "smallint COMMENT '-1 辅助商品  1  基础商品'")
  private Short isDefaultGoods;
  /**
   * 与基础商品转换率（如果是基础商品 则等于1）
   */
  @Column(name = "CONVERSION_RATE", columnDefinition = "decimal(19,2) COMMENT '与基础商品转换率（如果是基础商品 则等于1）'")
  private BigDecimal conversionRate;
  /**
   * 规格
   */
  @Column(name = "SPEC_NAME", columnDefinition = "varchar(50) COMMENT '规格'")
  private String specName;
  /**
   * 退货数量
   */
  @Column(name = "RETURN_QUANTITY", columnDefinition = "decimal(19,2) COMMENT '退货订单数量'")
  private BigDecimal returnQuantity;
  /**
   * 物流单生成数量
   */
  @Column(name = "GENERATED_QUANTITY", columnDefinition = "decimal(19,2) COMMENT '物流单生成数量'")
  private BigDecimal generatedQuantity;
  /**
   * 已出库的退货数量(发货)
   */
  @Column(name = "RETURN_OUTED_QUANTITY", columnDefinition = "decimal(19,2) COMMENT '已出库的退货数量'")
  private BigDecimal returnOutedQuantity;
  /**
   * 商品退货金额
   */
  @Column(name = "RETURN_TOTAL_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '退货订单商品金额'")
  private BigDecimal returnTotalAmount;
  /**
   * 退货单发货数量
   */
  @Column(name = "RETURN_OUT_QUANTITY", columnDefinition = "decimal(19,2) COMMENT '退货单发货数量'")
  private BigDecimal returnOutQuantity;
  /**
   * 退货单发货商品金额
   */
  @Column(name = "RETURN_TOTAL_OUT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '退货单发货商品金额'")
  private BigDecimal returnTotalOutAmount;
  /**
   * 退货签收数量
   */
  @Column(name = "RETURN_IN_QUANTITY", columnDefinition = "decimal(19,2) COMMENT '退货签收数量'")
  private BigDecimal returnInQuantity;
  /**
   * 退货签收商品金额
   */
  @Column(name = "RETURN_TOTAL_IN_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '退货签收商品金额'")
  private BigDecimal returnTotalInAmount;
  /**
   * 退货原因id
   */
  @Column(name = "RETURN_REASON_ID", columnDefinition = "bigint COMMENT '退货原因id'")
  private Long returnReasonId;
  /**
   * 备注
   */
  @Column(name = "REMARK", columnDefinition = "varchar(100) COMMENT '备注'")
  private String remark;
}
